package com.ruoyi.disasterassessment.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.disasterassessment.mapper.AlarmWarnPredictionMapper;
import com.ruoyi.disasterassessment.domain.AlarmWarnPrediction;
import com.ruoyi.disasterassessment.service.IAlarmWarnPredictionService;

/**
 * 预警预测模拟数据Service业务层处理
 * 
 * @author hcc
 * @date 2023-12-20
 */
@Service
public class AlarmWarnPredictionServiceImpl implements IAlarmWarnPredictionService 
{
    @Autowired
    private AlarmWarnPredictionMapper alarmWarnPredictionMapper;

    /**
     * 查询预警预测模拟数据
     * 
     * @param id 预警预测模拟数据主键
     * @return 预警预测模拟数据
     */
    @Override
    public AlarmWarnPrediction selectAlarmWarnPredictionById(String id)
    {
        return alarmWarnPredictionMapper.selectAlarmWarnPredictionById(id);
    }

    /**
     * 查询预警预测模拟数据列表
     * 
     * @param alarmWarnPrediction 预警预测模拟数据
     * @return 预警预测模拟数据
     */
    @Override
    public List<AlarmWarnPrediction> selectAlarmWarnPredictionList(AlarmWarnPrediction alarmWarnPrediction)
    {
        return alarmWarnPredictionMapper.selectAlarmWarnPredictionList(alarmWarnPrediction);
    }

    /**
     * 新增预警预测模拟数据
     * 
     * @param alarmWarnPrediction 预警预测模拟数据
     * @return 结果
     */
    @Override
    public int insertAlarmWarnPrediction(AlarmWarnPrediction alarmWarnPrediction)
    {
        alarmWarnPrediction.setCreateTime(DateUtils.getNowDate());
        return alarmWarnPredictionMapper.insertAlarmWarnPrediction(alarmWarnPrediction);
    }

    /**
     * 修改预警预测模拟数据
     * 
     * @param alarmWarnPrediction 预警预测模拟数据
     * @return 结果
     */
    @Override
    public int updateAlarmWarnPrediction(AlarmWarnPrediction alarmWarnPrediction)
    {
        alarmWarnPrediction.setUpdateTime(DateUtils.getNowDate());
        return alarmWarnPredictionMapper.updateAlarmWarnPrediction(alarmWarnPrediction);
    }

    /**
     * 批量删除预警预测模拟数据
     * 
     * @param ids 需要删除的预警预测模拟数据主键
     * @return 结果
     */
    @Override
    public int deleteAlarmWarnPredictionByIds(String[] ids)
    {
        return alarmWarnPredictionMapper.deleteAlarmWarnPredictionByIds(ids);
    }

    /**
     * 删除预警预测模拟数据信息
     * 
     * @param id 预警预测模拟数据主键
     * @return 结果
     */
    @Override
    public int deleteAlarmWarnPredictionById(String id)
    {
        return alarmWarnPredictionMapper.deleteAlarmWarnPredictionById(id);
    }
}
